import numpy as np

# 通俗易懂的讲解奇异值分解(SVD)和主成分分析 https://baijiahao.baidu.com/s?id=1669382088633385476&wfr=spider&for=pc

A = np.array([
    [1, 4, 7],
    [2, 3, 5],
    [3, 1, 9],
    [1, 2, 1],
    [6, 4, 9]
])

print("A:\n", A)

U, s, V = np.linalg.svd(A)
print("U:\n", U)
print("s:\n", s)
print("V:\n", V)